package com.umanji.building.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.OrderBy;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.umanji.generic.entity.UUIDEntity;

@Entity
@Table(name="umanji_building_info")
public class BuildingInfos extends UUIDEntity<BuildingInfos> {

	@ManyToOne
	@JoinColumn(name="BUILDING_ID", insertable=true, updatable=true)
	private Buildings building;

	@ManyToOne
	@JoinColumn(name="POBUILDING_ID", insertable=true, updatable=true)
	private PublicOfficialBuildings publicOfficialBuilding;

	@Column(name="NAME", length=150)
	private String name;
	
	@Column(name="DESCRIPTION", length=250)
	private String description;

	@Temporal(TemporalType.DATE)
	private Date regDate;

	public BuildingInfos() {

	}

	public BuildingInfos(String name, String description) {
		this.name = name;
		this.description = description;
	}

	public Date getRegDate() {
		return regDate;
	}

	public void setRegDate(Date regDate) {
		this.regDate = regDate;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setContent(String description) {
		this.description = description;
	}

	public Buildings getBuilding() {
		return building;
	}

	public void setBuilding(Buildings building) {
		this.building = building;
	}

	public void setPublicOfficialBuilding(PublicOfficialBuildings publicOfficialBuilding) {
		this.publicOfficialBuilding = publicOfficialBuilding;
	}

	public PublicOfficialBuildings getPublicOfficialBuilding() {
		return publicOfficialBuilding;
	}
}
